#include <iostream>
#include <future>
using namespace std;

int func() {
    int i = 0;
    for(i=0;i<1000;i++)
        i++;
    return i;
}

int main()
{
    future<int> ret=async(launch::async, func);
    cout<<func()<<endl;
    cout<<ret.get()<<endl;
}